package com.atguigu.d_ticket;

public class Ticket implements Runnable{
    int count = 50;
    @Override
    public void run() {
        while (true){
            if (count>0){
                System.out.println(Thread.currentThread().getName()+"买到了第"+count+"张票,剩余"+(--count)+"张票");

            }
        }
    }
}
